package com.cool.filter;

import java.util.HashMap;
import java.util.Map;

public class EatDinner {
    private Map dinnes  = null;

    public EatDinner(Map dinnes) {
        this.dinnes = dinnes;
    }

    public void pDinner(){
        int  a = (int) (Math.random() * dinnes.size() + 1);

        System.out.println(dinnes.get(a+"").toString());
    }

    public static void main(String[] args) {
        Map diners = new HashMap();
        diners.put("1","沙县");
        diners.put("2","饺子");
        diners.put("3","洞庭");
        EatDinner eatDinner = new EatDinner(diners);
        for (int i=0;i<10;i++){
            eatDinner.pDinner();
        }

    }
}
